package service.participate;

import dao.ParticipateDAO;
import dao.RecordDuplicateException;
import relations.Participate;


public class ParticipateServiceInMemory implements ParticipateService {

	public ParticipateServiceInMemory(){
		
	}
	
	public static ParticipateService newInstance(){
		return new ParticipateServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public Participate findParticipate(Long product_id, Long a_id){
		ParticipateDAO db = ParticipateDAO.getInstance();
		Participate result = null;
		result = db.findParticipate(product_id, a_id);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addParticipate(Participate obj) throws RecordDuplicateException{
		ParticipateDAO db = ParticipateDAO.getInstance();	
		db.addParticipate(obj);
		return;
	}





}
